#!/bin/bash
file=$(wget -O - https://ftp.gnu.org/gnu/$1/ 2>/dev/null | sed "s/.*href=\"//g;s/\".*//g" | grep -e "$1-[0-9]" | grep -v "sig$" | sort -V | tail -n 1)
echo "file: $file"
echo "Url: https://ftp.gnu.org/gnu/$1/$file"
echo "Version: $(echo $file | sed "s/.*-//g;s/\.tar.*//g")"
